home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
src
/
mactech
/
volume14_1998
/
14.12.sit
/
14.12
/
Poor Man's Bryce 3.0
/
PMBShell.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-09
|
2KB
|
60 lines
#pragma once
// PMBShell.h
// ©1998 by Kas Thomas.
// Portions ©1998 by MacTech Magazine and Xplain Corp.
#include "QD3D.h"
#include "QD3DGeometry.h"
// macros
#define HiWrd( aLong ) (((aLong) >> 16) & 0xFFFF)
#define LoWrd( aLong) (aLong & 0xFFFF)
// defines
#define APPLE_MENU 100
#define FILE_MENU 101
#define EDIT_MENU 102
#define RENDER_MENU 103
#define PREFS_MENU 104
#define OUR_ALERT_RSRC_NO 401
#define QUIT_ITEM 6
#define TEXTURE_ITEM 4
#define CLOSE_ITEM 3
#define OPEN_ITEM 2
#define SPEED_CHECK_ITEM 5
#define SWAP_GEOMETRY_ITEM 5
// typedefs
struct _documentRecord {
TQ3ViewObject fView ; // the view for the scene
TQ3GroupObject fModel ; // object in the scene being modelled
TQ3StyleObject fInterpolation ; // interpolation style used when rendering
TQ3StyleObject fBackFacing ; // whether to draw shapes that face away from the camera
TQ3StyleObject fFillStyle ; // whether drawn as solid filled object or not
float fScale; // for AdjustCamera()
TQ3GroupPosition fRotation; // the transform for the model
TQ3GroupPosition fObjectScale; // for user-scaling of object
long fMaxVertices; // for user Prefs (grid resolution)
Boolean fModelHasUVs; // Does the model have UVs?
TQ3GeometryObject fAlternateGeometry; // do we have more than one representation?
};
typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
// prototypes
static void InitToolbox( void ) ;
static void MainEventLoop( void ) ;
static void HandleOSEvent(EventRecord *event) ;
void InitDocumentData( DocumentPtr theDocument,FSSpec *fss ) ;
TQ3Status DocumentDraw( DocumentPtr theDocument ) ;
void DisposeDocumentData( DocumentPtr theDocument) ;
void SetupMenus( void );
void DoMenu( long choice );
void DoPolyhedralConversion( DocumentPtr theDocument );
void ConvertTriangles( TQ3TriGridData *tgData,
TQ3PolyhedronTriangleData **t,
unsigned long *numTriangles);
void SwapGeometries( DocumentPtr theDocument ) ;
void Explain( Str63 msg, long num );